/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package th.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.CascadeType;

@Entity
@Table(name = "tahun_pilihan")
@NamedQueries({
@NamedQuery(name = "TahunPilihan.findAll", query = "SELECT p FROM TahunPilihan p")})
public class TahunPilihan implements Serializable{
    
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "yr_islamic")
    private Integer islamicYear;
    
    @Column(name = "nrml_year")
    private Integer year;

    public Integer getIslamicYear() {
        return islamicYear;
    }

    public void setIslamicYear(Integer islamicYear) {
        this.islamicYear = islamicYear;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 97 * hash + (this.islamicYear != null ? this.islamicYear.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TahunPilihan other = (TahunPilihan) obj;
        if (this.islamicYear != other.islamicYear && (this.islamicYear == null || !this.islamicYear.equals(other.islamicYear))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "TahunPilihan{" + "islamicYear=" + islamicYear + ", year=" + year + '}';
    }
    
    
}
